var urlHead = 'http://114.115.159.157:8081/grid/public/index.php/company/';

/**
 * 初始化区域
 * @param {Object} map
 */

var pObj={}
function initqy(map,m) {
    var Q1 = new BMap.Polygon([
        new BMap.Point(104.379291, 31.142238),
        new BMap.Point(104.385094, 31.149424),
        new BMap.Point(104.38504, 31.152406),
        new BMap.Point(104.372248, 31.161028),
        new BMap.Point(104.363373, 31.151417),
        new BMap.Point(104.363202, 31.149308),
        new BMap.Point(104.36764, 31.149123)
    ], {
        strokeColor: "#fce3e6",
        fillColor: "#fce3e6",
        strokeWeight: 1,
        strokeOpacity: 0.00001,
        fillOpacity: 0.3,
    });
    pObj.Q1=Q1
//  Q1.addEventListener('click', function(e) {
//      addAlert('Q1', e, m);
//  })


    var Q2 = new BMap.Polygon([
        new BMap.Point(104.373578, 31.133522),
        new BMap.Point(104.379291, 31.142238),
        new BMap.Point(104.374305,31.14529),
        new BMap.Point(104.372724,31.143575),
        new BMap.Point(104.372688,31.137239),
        new BMap.Point(104.373102,31.133561)
    ], {
        strokeColor: "#c0c1d6",
        fillColor: "#c0c1d6",
        strokeWeight: 1,
        strokeOpacity: 1,
        fillOpacity: 0.3,
    });
//  Q2.addEventListener('click', function(e) {
//      addAlert('Q2', e,m);
//  })
    pObj.Q2=Q2

    var Q3 = new BMap.Polygon([
        new BMap.Point(104.374305,31.14529),
        new BMap.Point(104.36936, 31.148269),
        new BMap.Point(104.368471, 31.147411),
        new BMap.Point(104.36812, 31.146252),
        new BMap.Point(104.368089,31.140809),       
        new BMap.Point(104.372688,31.140778),
        new BMap.Point(104.372724,31.143575)
    ], {
        strokeColor: "#c1d5c9",
        fillColor: "#c1d5c9",
        strokeWeight: 1,
        strokeOpacity: 1,
        fillOpacity: 0.3,
    });
//  Q3.addEventListener('click', function(e) {
//      addAlert('Q3', e,m);
//  })
    pObj.Q3=Q3
    
    var Q4 = new BMap.Polygon([
        new BMap.Point(104.368089,31.140809),
        new BMap.Point(104.372688,31.140778),
        new BMap.Point(104.37267,31.137208),
        new BMap.Point(104.367999,31.137208)
    ], {
        strokeColor: "#c2dee1",
        fillColor: "#c2dee1",
        strokeWeight: 1,
        strokeOpacity: 1,
        fillOpacity: 0.3,
    });
//  Q4.addEventListener('click', function(e) {
//      addAlert('Q4', e,m);
//  })
    pObj.Q4=Q4
    
    var Q5 = new BMap.Polygon([
        new BMap.Point(104.37267,31.137208),
        new BMap.Point(104.367999,31.137208),
        new BMap.Point(104.367945,31.133607),
        new BMap.Point(104.373102,31.13353)
    ], {
        strokeColor: "#d6b8d2",
        fillColor: "#d6b8d2",
        strokeWeight: 1,
        strokeOpacity: 1,
        fillOpacity: 0.3,
    });
//  Q5.addEventListener('click', function(e) {
//      addAlert('Q5', e, m);
//  })
    pObj.Q5=Q5
    var Q6 = new BMap.Polygon([
        new BMap.Point(104.362475, 31.118313),
        new BMap.Point(104.365978, 31.124326),
        new BMap.Point(104.373578, 31.133522),
        new BMap.Point(104.36287, 31.133584)
    ], {
        strokeColor: "#89ced5",
        fillColor: "#89ced5",
        strokeWeight: 1,
        strokeOpacity: 1,
        fillOpacity: 0.3,
    });
//  Q6.addEventListener('click', function(e) {
//      addAlert('Q6', e, m);
//  })
    pObj.Q6=Q6
    var Q7 = new BMap.Polygon([
        new BMap.Point(104.36936, 31.148269),
        new BMap.Point(104.36764, 31.149123),
        new BMap.Point(104.363301, 31.149378),
        new BMap.Point(104.363063,31.14361),
        new BMap.Point(104.368085,31.143679),
        new BMap.Point(104.36812, 31.146252),
        new BMap.Point(104.368471, 31.147411)
    ], {
        strokeColor: "#c9d488",
        fillColor: "#c9d488",
        strokeWeight: 1,
        strokeOpacity: 1,
        fillOpacity: 0.3,
    });
//  Q7.addEventListener('click', function(e) {
//      addAlert('Q7', e,m);
//  })
    pObj.Q7=Q7

var Q8 = new BMap.Polygon([
        new BMap.Point(104.362942,31.140832),
        new BMap.Point(104.363063,31.14361),
        new BMap.Point(104.368085,31.143679),
        new BMap.Point(104.368053, 31.140832)
    ], {
        strokeColor: "#88d4a6",
        fillColor: "#88d4a6",
        strokeWeight: 1,
        strokeOpacity: 1,
        fillOpacity: 0.3,
    });
//  Q8.addEventListener('click', function(e) {
//      addAlert('Q8', e,m);
//  })
    pObj.Q8=Q8
    var Q9 = new BMap.Polygon([
        new BMap.Point(104.362942, 31.140832),
        new BMap.Point(104.362951,31.137131),
        new BMap.Point(104.367999,31.137223),
        new BMap.Point(104.368053, 31.140832)
    ], {
        strokeColor: "#9a819e",
        fillColor: "#9a819e",
        strokeWeight: 1,
        strokeOpacity: 1,
        fillOpacity: 0.3,
    });
//  Q9.addEventListener('click', function(e) {
//      addAlert('Q9', e,m);
//  })
    pObj.Q9=Q9
    var Q10 = new BMap.Polygon([
        new BMap.Point(104.362951,31.137131),
        new BMap.Point(104.36287, 31.133584),
        new BMap.Point(104.367968, 31.133572),
        new BMap.Point(104.367999,31.137223)
    ], {
        strokeColor: "#d7d695",
        fillColor: "#d7d695",
        strokeWeight: 1,
        strokeOpacity: 1,
        fillOpacity: 0.3,
    });
//  Q10.addEventListener('click', function(e) {
//      addAlert('Q4', e, m);
//  })
    pObj.Q10=Q10

    

    var Q11 = new BMap.Polygon([
        new BMap.Point(104.372248, 31.161028),
        new BMap.Point(104.357839, 31.170514),
        new BMap.Point(104.341688, 31.154245),
        new BMap.Point(104.341715, 31.143884),
        new BMap.Point(104.363014, 31.143536),
        new BMap.Point(104.363373, 31.151417)
    ], {
        strokeColor: "#bca7df",
        fillColor: "#bca7df",
        strokeWeight: 1,
        strokeOpacity: 1,
        fillOpacity: 0.3,
    });
//  Q11.addEventListener('click', function(e) {
//      addAlert('Q11', e, m);
//  })
    pObj.Q11=Q11
    var Q12 = new BMap.Polygon([
        new BMap.Point(104.363014, 31.143536),
        new BMap.Point(104.356115, 31.143622),
        new BMap.Point(104.35607,31.140886),
        new BMap.Point(104.362942,31.140786)
    ], {
        strokeColor: "#d482ca",
        fillColor: "#d482ca",
        strokeWeight: 1,
        strokeOpacity: 1,
        fillOpacity: 0.3,
    });
//  Q12.addEventListener('click', function(e) {
//      addAlert('Q12', e,m);
//  })
    pObj.Q12=Q12
    var Q13 = new BMap.Polygon([
        new BMap.Point(104.362942,31.140786),
        new BMap.Point(104.35607,31.140886),
        new BMap.Point(104.355935, 31.137262),
        new BMap.Point(104.36287, 31.137231)
    ], {
        strokeColor: "#abbfb4",
        fillColor: "#abbfb4",
        strokeWeight: 1,
        strokeOpacity: 1,
        fillOpacity: 0.3,
    });
//  Q13.addEventListener('click', function(e) {
//      addAlert('Q13', e,m);
//  })
    pObj.Q13=Q13
    var Q14 = new BMap.Polygon([
        new BMap.Point(104.355908,31.133437),
        new BMap.Point(104.355872,31.137254),
        new BMap.Point(104.36287, 31.137231),
        new BMap.Point(104.36287, 31.133584)
    ], {
        strokeColor: "#c9b5d0",
        fillColor: "#c9b5d0",
        strokeWeight: 1,
        strokeOpacity: 1,
        fillOpacity: 0.3,
    });
//  Q14.addEventListener('click', function(e) {
//      addAlert('Q14', e,m);
//  })
    pObj.Q14=Q14
    var Q15 = new BMap.Polygon([
        new BMap.Point(104.356115, 31.143622),
        new BMap.Point(104.349782, 31.143791),
        new BMap.Point(104.349638, 31.137254),
        new BMap.Point(104.355935, 31.137262)
    ], {
        strokeColor: "#a2cf8e",
        fillColor: "#a2cf8e",
        strokeWeight: 1,
        strokeOpacity: 1,
        fillOpacity: 0.3,
    });
//  Q15.addEventListener('click', function(e) {
//      addAlert('Q15', e,m);
//  })
    pObj.Q15=Q15
    var Q16 = new BMap.Polygon([
        new BMap.Point(104.349638, 31.137254),
        new BMap.Point(104.349575, 31.133213),
        new BMap.Point(104.355908,31.133437),
        new BMap.Point(104.355872,31.137254)
    ], {
        strokeColor: "#e3dcd2",
        fillColor: "#e3dcd2",
        strokeWeight: 1,
        strokeOpacity: 1,
        fillOpacity: 0.3,
    });
//  Q16.addEventListener('click', function(e) {
//      addAlert('Q16', e,m);
//  })
    pObj.Q16=Q16
    var Q17 = new BMap.Polygon([
        new BMap.Point(104.338014,31.143915),
        new BMap.Point(104.340349,31.133406),
        new BMap.Point(104.349566, 31.133221),
        new BMap.Point(104.349782, 31.143791)
    ], {
        strokeColor: "#d0d585",
        fillColor: "#d0d585",
        strokeWeight: 1,
        strokeOpacity: 1,
        fillOpacity: 0.3,
    });
//  Q17.addEventListener('click', function(e) {
//      addAlert('Q17', e, m);
//  })
    pObj.Q17=Q17
    var Q18 = new BMap.Polygon([
        new BMap.Point(104.330567, 31.143984),
        new BMap.Point(104.330576, 31.133514),
        new BMap.Point(104.340349,31.133406),
        new BMap.Point(104.338014,31.143915)
    ], {
        strokeColor: "#d486a0",
        fillColor: "#d486a0",
        strokeWeight: 1,
        strokeOpacity: 1,
        fillOpacity: 0.3,
    });
//  Q18.addEventListener('click', function(e) {
//      addAlert('Q18', e,m);
//  })
    pObj.Q18=Q18
    var Q19 = new BMap.Polygon([
        new BMap.Point(104.355692,31.126992),
        new BMap.Point(104.362672, 31.126984),
        new BMap.Point(104.36287, 31.133584),
        new BMap.Point(104.355908,31.133391)
    ], {
        strokeColor: "#b9a685",
        fillColor: "#b9a685",
        strokeWeight: 1,
        strokeOpacity: 1,
        fillOpacity: 0.3,
    });
//  Q19.addEventListener('click', function(e) {
//      addAlert('Q19', e, m);
//  })
    pObj.Q19=Q19

    var Q20 = new BMap.Polygon([
        new BMap.Point(104.349575, 31.133213),
        new BMap.Point(104.349377, 31.126984),
        new BMap.Point(104.355692,31.126992),
        new BMap.Point(104.355908,31.133391)
    ], {
        strokeColor: "#d29f9b",
        fillColor: "#d29f9b",
        strokeWeight: 1,
        strokeOpacity: 1,
        fillOpacity: 0.3,
    });
//  Q20.addEventListener('click', function(e) {
//      addAlert('Q20', e, m);
//  })
    pObj.Q20=Q20
    
    var Q21 = new BMap.Polygon([
        new BMap.Point(104.341984,31.126667),
        new BMap.Point(104.34361, 31.126876),
        new BMap.Point(104.349359, 31.127),
        new BMap.Point(104.349539, 31.133244),
        new BMap.Point(104.340331,31.133421)
    ], {
        strokeColor: "#87ba8f",
        fillColor: "#87ba8f",
        strokeWeight: 1,
        strokeOpacity: 1,
        fillOpacity: 0.3,
    });
//  Q21.addEventListener('click', function(e) {
//      addAlert('Q21', e, m);
//  })
    pObj.Q21=Q21
    var Q22 = new BMap.Polygon([
        new BMap.Point(104.334447, 31.133491),
        new BMap.Point(104.334735, 31.128793),
        new BMap.Point(104.335669, 31.125361),
        new BMap.Point(104.341984,31.126667),
        new BMap.Point(104.340331,31.133421)
    ], {
        strokeColor: "#cad8e1",
        fillColor: "#cad8e1",
        strokeWeight: 1,
        strokeOpacity: 1,
        fillOpacity: 0.3,
    });
//  Q22.addEventListener('click', function(e) {
//      addAlert('Q22', e,m);
//  })
    pObj.Q22=Q22
    var Q23 = new BMap.Polygon([
        new BMap.Point(104.330567, 31.133553),
        new BMap.Point(104.330567, 31.125299),
        new BMap.Point(104.335633, 31.125423),
        new BMap.Point(104.334699, 31.128854),
        new BMap.Point(104.334447, 31.133491)
    ], {
        strokeColor: "#e2ad8d",
        fillColor: "#e2ad8d",
        strokeWeight: 1,
        strokeOpacity: 1,
        fillOpacity: 0.3,
    });
//  Q23.addEventListener('click', function(e) {
//      addAlert('Q23', e, m);
//  })
    pObj.Q23=Q23
    var Q24 = new BMap.Polygon([
        new BMap.Point(104.330567, 31.125299),
        new BMap.Point(104.33054,31.121922),
        new BMap.Point(104.336648,31.121798),
        new BMap.Point(104.335674, 31.125388)
    ], {
        strokeColor: "#b9b8b4",
        fillColor: "#b9b8b4",
        strokeWeight: 1,
        strokeOpacity: 1,
        fillOpacity: 0.3,
    });
//  Q24.addEventListener('click', function(e) {
//      addAlert('Q24', e, m);
//  })
    pObj.Q24=Q24
    var Q25 = new BMap.Polygon([
        new BMap.Point(104.335669, 31.125392),
        new BMap.Point(104.336644,31.121802),
        new BMap.Point(104.342685,31.121675),
        new BMap.Point(104.342721, 31.123777),
        new BMap.Point(104.34202, 31.126575)
    ], {
        strokeColor: "#d2bad2",
        fillColor: "#d2bad2",
        strokeWeight: 1,
        strokeOpacity: 1,
        fillOpacity: 0.3,
    });
//  Q25.addEventListener('click', function(e) {
//      addAlert('Q25', e, m);
//  })
    pObj.Q25=Q25
    var Q26 = new BMap.Polygon([
        new BMap.Point(104.341993, 31.126629),
        new BMap.Point(104.342784, 31.123908),
        new BMap.Point(104.342685,31.121675),
        new BMap.Point(104.349261,31.121505),
        new BMap.Point(104.349386, 31.127038)
    ], {
        strokeColor: "#b99f62",
        fillColor: "#b99f62",
        strokeWeight: 1,
        strokeOpacity: 1,
        fillOpacity: 0.3,
    });
//  Q26.addEventListener('click', function(e) {
//      addAlert('Q26', e, m);
//  })
    pObj.Q26=Q26
    var Q27 = new BMap.Polygon([
        new BMap.Point(104.349377, 31.126984),
        new BMap.Point(104.349252, 31.121466),
        new BMap.Point(104.355576, 31.121404),
        new BMap.Point(104.355719, 31.126984)
    ], {
        strokeColor: "#9aa5d3",
        fillColor: "#9aa5d3",
        strokeWeight: 1,
        strokeOpacity: 1,
        fillOpacity: 0.3,
    });
//  Q27.addEventListener('click', function(e) {
//      addAlert('Q27', e, m);
//  })
    pObj.Q27=Q27
    var Q28 = new BMap.Polygon([
        new BMap.Point(104.355719, 31.127),
        new BMap.Point(104.355639,31.124024),
        new BMap.Point(104.362591,31.123978),
        new BMap.Point(104.362654, 31.127)
    ], {
        strokeColor: "#d3b5aa",
        fillColor: "#d3b5aa",
        strokeWeight: 1,
        strokeOpacity: 1,
        fillOpacity: 0.3,
    });
//  Q28.addEventListener('click', function(e) {
//      addAlert('Q28', e,m);
//  })
    pObj.Q28=Q28
    
    var Q29 = new BMap.Polygon([
        new BMap.Point(104.355639,31.124024),
        new BMap.Point(104.355612, 31.121373),
        new BMap.Point(104.362546, 31.121312),
        new BMap.Point(104.362591,31.123978)
    ], {
        strokeColor: "#c8d3a9",
        fillColor: "#c8d3a9",
        strokeWeight: 1,
        strokeOpacity: 1,
        fillOpacity: 0.3,
    });
//  Q29.addEventListener('click', function(e) {
//      addAlert('Q29', e, m);
//  })
    pObj.Q29=Q29

    

    var Q30 = new BMap.Polygon([
        new BMap.Point(104.358845, 31.114201),
        new BMap.Point(104.362475, 31.118313),
        new BMap.Point(104.362582, 31.121281),
        new BMap.Point(104.355612, 31.121342),
        new BMap.Point(104.355396, 31.116087)
    ], {
        strokeColor: "#d4d0ab",
        fillColor: "#d4d0ab",
        strokeWeight: 1,
        strokeOpacity: 1,
        fillOpacity: 0.3,
    });
//  Q30.addEventListener('click', function(e) {
//      addAlert('Q30', e, m);
//  })
    pObj.Q30=Q30

    var Q31 = new BMap.Polygon([
        new BMap.Point(104.349252, 31.121466),
        new BMap.Point(104.349108, 31.116303),
        new BMap.Point(104.355037, 31.116272),
        new BMap.Point(104.355396, 31.116149),
        new BMap.Point(104.355576, 31.121466)
    ], {
        strokeColor: "#d09ad6",
        fillColor: "#d09ad6",
        strokeWeight: 1,
        strokeOpacity: 1,
        fillOpacity: 0.3,
    });
//  Q31.addEventListener('click', function(e) {
//      addAlert('Q31', e, m);
//  })
    pObj.Q31=Q31

    
    
    


    var Q32 = new BMap.Polygon([
        new BMap.Point(104.342685,31.121675),
        new BMap.Point(104.342676, 31.116396),
        new BMap.Point(104.349108, 31.116334),
        new BMap.Point(104.349261,31.121505)
    ], {
        strokeColor: "#b3d2d4",
        fillColor: "#b3d2d4",
        strokeWeight: 1,
        strokeOpacity: 1,
        fillOpacity: 0.3,
    });
//  Q32.addEventListener('click', function(e) {
//      addAlert('Q32', e,m);
//  })
    pObj.Q32=Q32
    

    var Q33 = new BMap.Polygon([
        new BMap.Point(104.336644,31.121802),
        new BMap.Point(104.33752, 31.118699),
        new BMap.Point(104.338517, 31.115414),
        new BMap.Point(104.340511, 31.116419),
        new BMap.Point(104.342631, 31.116404),
        new BMap.Point(104.342685,31.121675)
    ], {
        strokeColor: "#d2d3c1",
        fillColor: "#d2d3c1",
        strokeWeight: 1,
        strokeOpacity: 1,
        fillOpacity: 0.3,
    });
//  Q33.addEventListener('click', function(e) {
//      addAlert('Q33', e,m);
//  })
    pObj.Q33=Q33
    var Q34 = new BMap.Polygon([
        new BMap.Point(104.33054,31.121922),
        new BMap.Point(104.330495, 31.118869),
        new BMap.Point(104.331645, 31.115592),
        new BMap.Point(104.325608, 31.112346),
        new BMap.Point(104.327935,31.109494),
        new BMap.Point(104.338517, 31.115368),
        new BMap.Point(104.337502, 31.118715),
        new BMap.Point(104.336648,31.121798)
    ], {
        strokeColor: "#d5b994",
        fillColor: "#d5b994",
        strokeWeight: 1,
        strokeOpacity: 1,
        fillOpacity: 0.3,
    });
//  Q34.addEventListener('click', function(e) {
//      showOverLayer('Q34', e);
//  })
    pObj.Q34=Q34
    var Q35 = new BMap.Polygon([    
        new BMap.Point(104.315628, 31.137208),
        new BMap.Point(104.325635,31.134766),
        new BMap.Point(104.325671,31.131505),
        new BMap.Point(104.320362,31.130771)
    ], {
        strokeColor: "#9acad4",
        fillColor: "#9acad4",
        strokeWeight: 1,
        strokeOpacity: 1,
        fillOpacity: 0.3,
    });
//  Q35.addEventListener('click', function(e) {
//      addAlert('Q35', e, m);
//  })
    pObj.Q35=Q35
    var Q36 = new BMap.Polygon([    
        new BMap.Point(104.325635,31.134766),
        new BMap.Point(104.325671,31.131505),
        new BMap.Point(104.320362,31.130771),
        new BMap.Point(104.323479,31.126575),
        new BMap.Point(104.325527, 31.127409),
        new BMap.Point(104.330562, 31.12814),
        new BMap.Point(104.330531, 31.133599)
    ], {
        strokeColor: "#d09ad4",
        fillColor: "#d09ad4",
        strokeWeight: 1,
        strokeOpacity: 1,
        fillOpacity: 0.3,
    });
//  Q36.addEventListener('click', function(e) {
//      addAlert('Q36', e, m);
//  })
    pObj.Q36=Q36
    var Q37 = new BMap.Polygon([
        new BMap.Point(104.323704, 31.12635),
        new BMap.Point(104.331645, 31.115654),
        new BMap.Point(104.330459, 31.118931),
        new BMap.Point(104.330531, 31.128174),
        new BMap.Point(104.325572, 31.127463)
    ], {
        strokeColor: "#9bdfec",
        fillColor: "#9bdfec",
        strokeWeight: 1,
        strokeOpacity: 1,
        fillOpacity: 0.3,
    });
//  Q37.addEventListener('click', function(e) {
//      addAlert('Q37', e, m);
//  })
    pObj.Q37=Q37


    var Q38 = new BMap.Polygon([
        new BMap.Point(104.338517, 31.115368),
        new BMap.Point(104.340511, 31.116404),
        new BMap.Point(104.355082, 31.116249),
        new BMap.Point(104.35885,31.114189),        
        new BMap.Point(104.357377,31.11235),
        new BMap.Point(104.356442,31.113046),
        new BMap.Point(104.342627,31.113277),
        new BMap.Point(104.340722,31.112242)
    ], {
        strokeColor: "#89d1ab",
        fillColor: "#89d1ab",
        strokeWeight: 1,
        strokeOpacity: 1,
        fillOpacity: 0.3,
    });
//  Q38.addEventListener('click', function(e) {
//      addAlert('Q38', e,m);
//  })
    pObj.Q38=Q38
    
    var Q39 = new BMap.Polygon([
        new BMap.Point(104.357377,31.11235),
        new BMap.Point(104.356442,31.113046),
        new BMap.Point(104.342627,31.113277),
        new BMap.Point(104.340722,31.112242),
        new BMap.Point(104.348012, 31.101818),
        new BMap.Point(104.349234, 31.102746)
    ], {
        strokeColor: "#d1c088",
        fillColor: "#d1c088",
        strokeWeight: 1,
        strokeOpacity: 1,
        fillOpacity: 0.3,
    });
//  Q39.addEventListener('click', function(e) {
//      addAlert('Q39', e, m);
//  })
    pObj.Q39=Q39
    var Q40 = new BMap.Polygon([
        new BMap.Point(104.327935,31.109494),
        new BMap.Point(104.33946, 31.095572),
        new BMap.Point(104.348012, 31.101818),
        new BMap.Point(104.338517, 31.115368)
    ], {
        strokeColor: "#ae83d5",
        fillColor: "#ae83d5",
        strokeWeight: 1,
        strokeOpacity: 1,
        fillOpacity: 0.3,
    });
//  Q40.addEventListener('click', function(e) {
//      addAlert('Q40', e, m);
//  })
    pObj.Q40=Q40
    var Q41 = new BMap.Polygon([        
        new BMap.Point(104.30554, 31.138297),
        new BMap.Point(104.301444, 31.141388),
        new BMap.Point(104.315242,31.154987),
        new BMap.Point(104.322419,31.150011),
        new BMap.Point(104.34167,31.149378),
        new BMap.Point(104.341715, 31.143899),
        new BMap.Point(104.330558, 31.143992),
        new BMap.Point(104.330558, 31.133591),
        new BMap.Point(104.315646, 31.137208),
        new BMap.Point(104.307687, 31.137548)
    ], {
        strokeColor: "#cf898b",
        fillColor: "#cf898b",
        strokeWeight: 1,
        strokeOpacity: 1,
        fillOpacity: 0.3,
    });
//  Q41.addEventListener('click', function(e) {
//      addAlert('Q41', e, m);
//  })
    pObj.Q41=Q41
 
    var Q42 = new BMap.Polygon([
        new BMap.Point(104.305594, 31.13822),
        new BMap.Point(104.304911, 31.136706),
        new BMap.Point(104.305271, 31.13584),
        new BMap.Point(104.323093, 31.114356),
        new BMap.Point(104.325608, 31.112346),
        new BMap.Point(104.331609, 31.115592),
        new BMap.Point(104.315619, 31.1372),
        new BMap.Point(104.307678, 31.13754)
    ], {
        strokeColor: "#8ad094",
        fillColor: "#8ad094",
        strokeWeight: 1,
        strokeOpacity: 1,
        fillOpacity: 0.3,
    });
//  Q42.addEventListener('click', function(e) {
//      addAlert('Q42', e, m);
//  })
$.each(pObj, function(k,v) {
	map.addOverlay(v);
	 showcenter(k,v);
});
//  pObj.Q42=Q42
//  map.addOverlay(Q1);
//  showcenter('Q1',Q1);
//  map.addOverlay(Q2);
//  showcenter('Q1',Q1)
//  map.addOverlay(Q3);
//  showcenter('Q1',Q1)
//  map.addOverlay(Q4);
//  showcenter('Q1',Q1)
//  map.addOverlay(Q5);
//  showcenter('Q1',Q1)
//  map.addOverlay(Q6);
//  showcenter('Q1',Q1)
//  map.addOverlay(Q7);
//  showcenter('Q1',Q1)
//  map.addOverlay(Q8);
//  showcenter('Q1',Q1)
//  map.addOverlay(Q9);
//  showcenter('Q1',Q1)
//  map.addOverlay(Q10);
//  showcenter('Q1',Q1)
//  map.addOverlay(Q11);
//  showcenter('Q1',Q1)
//  map.addOverlay(Q12);
//  showcenter('Q1',Q1)
//  map.addOverlay(Q13);
//  showcenter('Q1',Q1)
//  map.addOverlay(Q14);
//  showcenter('Q1',Q1)
//  map.addOverlay(Q15)
//  showcenter('Q1',Q1);
//  map.addOverlay(Q16)
//  showcenter('Q1',Q1);
//  map.addOverlay(Q17)
//  showcenter('Q1',Q1);
//  map.addOverlay(Q18)
//  showcenter('Q1',Q1);
//  map.addOverlay(Q19)
//  showcenter('Q1',Q1);
//  map.addOverlay(Q20)
//  showcenter('Q1',Q1);
//  map.addOverlay(Q21)
//  showcenter('Q1',Q1);
//  map.addOverlay(Q22)
//  showcenter('Q1',Q1);
//  map.addOverlay(Q23)
//  showcenter('Q1',Q1);
//  map.addOverlay(Q24)
//  showcenter('Q1',Q1);
//  map.addOverlay(Q25)
//  showcenter('Q1',Q1);
//  map.addOverlay(Q26)
//  showcenter('Q1',Q1);
//  map.addOverlay(Q27)
//  showcenter('Q1',Q1);
//  map.addOverlay(Q28)
//  showcenter('Q1',Q1);
//  map.addOverlay(Q29)
//  showcenter('Q1',Q1);
//  map.addOverlay(Q30)
//  showcenter('Q1',Q1);
//  map.addOverlay(Q31)
//  showcenter('Q1',Q1);
//  map.addOverlay(Q32);
//  map.addOverlay(Q33);
//  map.addOverlay(Q34);
//  map.addOverlay(Q35);
//  map.addOverlay(Q36);
//  map.addOverlay(Q37);
//  map.addOverlay(Q38);
//  map.addOverlay(Q39);
//  map.addOverlay(Q40);
//  map.addOverlay(Q41);
//  map.addOverlay(Q42);
}

//编注区块中心点
function showcenter(name,obj){
    var pos=obj.getBounds().getCenter()
    var marker = new BMap.Marker(new BMap.Point(pos.lng, pos.lat)); // 创建标注
    var title=name
    marker.addEventListener('click', function(e) {
        showLayer(title)
    })
    map.addOverlay(marker); // 将标注添加到地图中
    var label = new BMap.Label(title, {
        offset: new BMap.Size(20, -10)
    });
    marker.setLabel(label);
}
//区块相关企业
function showLayer(name){
    var getData={
        url:'company_search/companyList',
        sendData:{flag:name}
    }
    getAjax(getData,function(data){
        if(data.code=='200'){
            var curData=data
            var tplData={curData:curData.data,flag:name,otherData:curData}
            var html = template('tpl-qList', tplData);
            layer.open({
                type: 1
                ,content: html
                ,anim: 'up'
                ,style: 'position:fixed; bottom:0; left:0; width: 100%; max-height: 80vh;border:none;background:#1C7AB5'
                ,success:function(layero){
                    $(layero).find('.plist-label span').on('click',function(){
                        var id=$(this).data('id')
                        mui.openWindow({
                            url:'page/companyInfo/companyInfo.html?id='+id,
                            id:'companyInfo.html',
                        });
                    })
                    $(layero).find('.readMore').on('click',function(){
                        var name=$(this).data('name')
                        var gid=$(this).data('id')
                        mui.openWindow({
                            url:'page/search/search.html?gid='+gid+'&name='+name,
                            id:'search.html',
                        });
                    })
                }
            });
        }else{
            layer.open({
                content: '该地区暂无企业'
                ,skin: 'msg'
                ,time: 2 //2秒后自动关闭
            });
        }
    })
}
